import { defAxios as request } from '@/utils/http'

/**
 * 获取表单列表数据
 *
 * @returns Proxy
 */
export function getPrdFormInfo(params) {
    return request({
        url: '/prdFormInfo/queryPrdFormInfoPageList',
        method: 'post',
        data: params
    })
}

/**
 * 删除表单
 *
 * @returns Proxy
 */
export function delPrdFormInfo(params) {
    return request({
        url: '/prdFormInfo/delPrdFormInfo',
        method: 'post',
        data: params
    })
}
/**
 * 表单启用
 *
 * @returns Proxy
 */
export function updateStatus(params) {
    return request({
        url: '/prdFormInfo/updateStatus',
        method: 'post',
        data: params
    })
}


/**
 * 表单启用
 *
 * @param {Object} params 表单配置信息
 * @returns axios
 */
export function addPrdFormInfo(params) {
	return request({
		url: '/prdFormInfo/addPrdFormInfo',
		method: 'POST',
		data: params
	})
}

/**
 * 通过表单id查询表单配置信息
 *
 * @param {String} value 表单ID
 * @returns axios
 */
export function getPrdFormInfoByFormId(formId) {
	return request({
		url: '/prdFormInfo/queryPrdFormInfoListByFormId',
		method: 'GET',
		params: { formId }
	})
}

/**
 * 表单复制
 *
 * @param {Object} params 表单配置信息
 * @returns axios
 */
export function copyPrdFormInfo(value) {
	return request({
		url: '/prdFormInfo/copyPrdFormInfo',
		method: 'POST',
		data: value
	})
}